package com.example.mqttmanage.controller;/*
 * @Auther:Sadie
 * @Date:2025/10/11
 * @Description:
 * @VERSON:1.8
 */

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 通讯信息控制类
 */
@RestController
@RequestMapping("/communication")
public class CommunicationController {
    //钩子函数上传通讯信息
    @PostMapping(value = "/upload", consumes = "application/json") // 明确指定 Content-Type
    public void uploadCommunication(@RequestBody String message) {
        System.out.println("上传通讯信息：" + message);
    }
}
